

export function listOrder(query) {
    return request({
        url: '/purchaseOrder/purchase-orders',
        method: 'get',
        params: query
    })
}

// 查询采购订单详细
export function getOrder(purchaseOrderId) {
    return request({
        url: `/purchaseOrder/${purchaseOrderId}`,
        method: 'get'
    })
}

// 新增采购订单
export function addOrder(data) {
    return request({
        url: '/purchaseOrder',
        method: 'post',
        data: data
    })
}

// 修改采购订单
export function updateOrder(data) {
    return request({
        url: '/purchaseOrder',
        method: 'put',
        data: data
    })
}

// 删除采购订单
export function delOrder(purchaseOrderId) {
    return request({
        url: `/purchaseOrder/${purchaseOrderId}`,
        method: 'delete'
    })
}
